<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>  

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'test.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  

  <body>
	<h1>登录成功 你的用户是 <shiro:principal>123</shiro:principal></h1>
	
	
	<shiro:guest>123</shiro:guest>
	<a href="logout.action">点击登出</a>
	
	<br>
	<shiro:hasPermission name="user:create">
	<h1>测试权限-menu</h1>
	<a href="menu.jsp">点击测试</a>
	<br>
	</shiro:hasPermission>
	<shiro:hasPermission name="user:create">
		<h1>注解权限测试页面</h1>
	<a href="gotouser.action">点击测试</a>
	</shiro:hasPermission>

  </body>
</html>
